package test3;

public class Penguin extends Pet {
    private String sex;

    public Penguin(String sex) {
        this.sex = sex;
    }

    public Penguin(String name, int health, int age, String sex) {
        super(name, health, age);
        this.sex = sex;
    }

    public String getsex() {
        return sex;
    }

    public void setsex(String sex) {
        this.sex = sex;
    }

    public Penguin() {
        super();
    }

    public Penguin(String name, int health, int age) {
        super(name, health, age);
    }

    void eat() {
        System.out.println("给企鹅吃鱼");
    }

    @Override
    void show() {
        System.out.println("性别：" + sex +
                ", 名字" + name +
                ", 健康值为：" + health +
                ", 年龄为：" + age+"岁");
    }
}
